import 'package:get/get.dart';
import 'package:sgy_flutter/model/device_type.dart';

enum ProductType {
  dls,
  axo,
  apm2,
  axpower,
  axocc,
  hiflow,
  jt,
  unknow;

  static ProductType fromDeviceType(DeviceType deviceType) {
    switch (deviceType) {
      case DeviceType.dlsL:
      case DeviceType.dlsR:
        return ProductType.dls;
      case DeviceType.axo:
        return ProductType.axo;
      case DeviceType.apm2:
        return ProductType.apm2;
      case DeviceType.axpower:
        return ProductType.axpower;
      case DeviceType.hiflow:
        return ProductType.hiflow;
      case DeviceType.jtL:
      case DeviceType.jrR:
        return ProductType.jt;
      case DeviceType.unknow:
        return ProductType.unknow;
      case DeviceType.axocc:
        return ProductType.axocc;
    }
  }
}
